﻿@using Janus.Mes.WebClient;
@using Janus.BaseEntitys;
@using Janus.Mes.VO;
@model DefectReasonVO
@{
    Layout = null;
    ViewBag.ViewTitle = "缺陷原因";
    IEnumerable<SelectListItem> DefectLevel = new SelectList(ViewData["DefectLevel"] as List<DefectLevelVO> ?? new List<DefectLevelVO>(), "DefectLCode", "DefectLName");
}
<div class="pageContent">
    <form method="post" action="BaseData/DefectReason/create?OpID=@ViewData["OperateID"]" class="pageForm required-validate"
          onsubmit="return validateCallback(this, dialogAjaxDone);">
        @Html.ValidationSummary(true)
        <div class="pageFormContent" layouth="56">
            <input id="hidIsCreate" name="hidIsCreate" type="hidden" value="@ViewBag.IsCreate" />
            @Html.HiddenFor(model => model.Id)
            <p>
                <label>
                    缺陷编码：
                </label>
                @Html.TextBoxFor(c => c.DefectRCode, new { @class = "required", ajaxurl = "BaseData/DefectReason/IsExist" })
                @Html.ValidationMessageFor(c => c.DefectRCode)
            </p>
            <p>
                <label>
                    缺陷等级：
                </label>
                @Html.DropDownListFor(c => c.DefectLCode, DefectLevel, new { @class = "required combox WidthAsInputCombox",selectedvalue=Model.DefectLCode })
                @Html.ValidationMessageFor(c => c.DefectLCode)
            </p>
            <p>
                <label>
                    缺陷描述：
                </label>
                @Html.TextBoxFor(c => c.DefectRName, new { @class = "required" })
                @Html.ValidationMessageFor(c => c.DefectRName)
            </p>
            <p>
                <label>
                    条码：
                </label>
                @Html.TextBoxFor(c => c.BarCode, new { @class = "" })
                @Html.ValidationMessageFor(c => c.BarCode)
            </p>
            <p>
                <label>
                    启用：
                </label>
                @Html.CheckBoxFor(c => c.IsEnable, new { @onclick = "return false" })
            </p>
            <p style="width:100%;height:50px">
                <label>
                    备注：
                </label>
                @Html.TextAreaFor(sysConfig => sysConfig.Remark, new { @style = "width:50%;height:30px" })
            </p>
            @Html.Partial("Operation", Model)
        </div>
        @Html.Partial("FormButtonBar")
    </form>
</div>